import {
	defineConfig
} from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path';

// https://vitejs.dev/config/
export default defineConfig({
	plugins: [vue()],
	define: {
		__VUE_PROD_HYDRATION_MISMATCH_DETAILS__: "true",
	},
	resolve: {
		alias: {
			'@': path.resolve(__dirname, './src'),
		},
	},
	server: {
		proxy: {
			'/api': {
				target: 'http://10.2.188.129:8888',
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/api/, '') // 重写路径，如不需要则不需要这个配置项  
			}
			// 你可以根据需要添加更多代理配置  
		},
	},
})